<template>
  <div class="">
    <!-- <NuxtLink to="/home/32">进入home</NuxtLink> -->
    <button @click="click">home</button>
    <button @click="toRequest">去测试接口页面</button>
  </div>
</template>

<script setup>
import {} from 'vue'
const router = useRouter()
async function click() {
    // 也可使用 router.push({path: '/home'})
    await navigateTo({
        path: '/home',
        query: {
            name: 'caomin',
            age: 18
        }
    })
}
async function toRequest() {
    // 也可使用 router.push({path: '/home'})
    await navigateTo({
        path: '/request'
    })
}
</script>

<style scoped></style>